package com.by.mapper;

import com.by.bean.CustomerInquiryDetail;
import com.by.common.crud.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

@Mapper
public interface CustomerInquiryDetailMapper extends BaseMapper<CustomerInquiryDetail> {
    /**
     * 批量保存
     *
     * @param id                     询价单id
     * @param customerInquiryDetails 询价明细
     * @return
     */
    int batchSave(@Param("id") int id, @Param("customerInquiryDetails") List<CustomerInquiryDetail> customerInquiryDetails);

    /**
     * 根据询价单id查询询价明细
     * @param id
     * @return
     */
    List<CustomerInquiryDetail> selectByInquiryId(@Param("inquiryId") Integer id);

    /**
     * 根据询价单id分页查询询价明细
     *
     * @param inquiryId 询价单id
     * @return
     */
    List<Map> selectByInquiryIdWithPage(@Param("inquiryId") Integer inquiryId);

}
